package com.ruoyi.share.service.impl;

import java.util.List;

import com.ruoyi.share.domain.ShareAllocationMoneyUser;
import com.ruoyi.share.mapper.ShareAllocationMoneyUserMapper;
import com.ruoyi.share.service.IShareAllocationMoneyUserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * 分账用户Service业务层处理
 *
 * @author ruoyi
 * @date 2021-11-16
 */
@Service
public class ShareAllocationMoneyUserServiceImpl implements IShareAllocationMoneyUserService
{
    @Autowired
    private ShareAllocationMoneyUserMapper shareAllocationMoneyUserMapper;

    /**
     * 查询分账用户
     *
     * @param id 分账用户主键
     * @return 分账用户
     */
    @Override
    public ShareAllocationMoneyUser selectShareAllocationMoneyUserById(Long id)
    {
        return shareAllocationMoneyUserMapper.selectShareAllocationMoneyUserById(id);
    }

    /**
     * 查询分账用户列表
     *
     * @param shareAllocationMoneyUser 分账用户
     * @return 分账用户
     */
    @Override
    public List<ShareAllocationMoneyUser> selectShareAllocationMoneyUserList(ShareAllocationMoneyUser shareAllocationMoneyUser)
    {
        return shareAllocationMoneyUserMapper.selectShareAllocationMoneyUserList(shareAllocationMoneyUser);
    }

    /**
     * 新增分账用户
     *
     * @param shareAllocationMoneyUser 分账用户
     * @return 结果
     */
    @Override
    public int insertShareAllocationMoneyUser(ShareAllocationMoneyUser shareAllocationMoneyUser)
    {
        return shareAllocationMoneyUserMapper.insertShareAllocationMoneyUser(shareAllocationMoneyUser);
    }

    /**
     * 修改分账用户
     *
     * @param shareAllocationMoneyUser 分账用户
     * @return 结果
     */
    @Override
    public int updateShareAllocationMoneyUser(ShareAllocationMoneyUser shareAllocationMoneyUser)
    {
        return shareAllocationMoneyUserMapper.updateShareAllocationMoneyUser(shareAllocationMoneyUser);
    }

    /**
     * 批量删除分账用户
     *
     * @param ids 需要删除的分账用户主键
     * @return 结果
     */
    @Override
    public int deleteShareAllocationMoneyUserByIds(Long[] ids)
    {
        return shareAllocationMoneyUserMapper.deleteShareAllocationMoneyUserByIds(ids);
    }

    /**
     * 删除分账用户信息
     *
     * @param id 分账用户主键
     * @return 结果
     */
    @Override
    public int deleteShareAllocationMoneyUserById(Long id)
    {
        return shareAllocationMoneyUserMapper.deleteShareAllocationMoneyUserById(id);
    }
}
